<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>专业搜索</title>
    <!-- load css -->
     <link rel="stylesheet" href="../css/layui.css"  media="all">

</head>
<style type="text/css">
    th,td,table{
        text-align: center;
    }
    .layui-table td, .layui-table th{padding: 0px;width: 50px;height: 25px;}
</style>

<body style="width:600px; height:300px;padding:20px; margin: 0 auto;">
       
      <input type="text" name="title" required  lay-verify="required" placeholder="  请输入需搜索专业名" autocomplete="off" style=" height: 30px; width:180px; float:left; margin-left:12px;line-height:30px">
<!-- 按钮代码 -->
<button class="layui-btn" style=" float: right; margin-right:12px">搜索</button>
    <!-- 表格代码 -->
    <div style="padding: 10px;clear: both;">
        <table class="layui-table"  >
  <colgroup>
    <col width="60">
    <col width="100">
    <col width="50">
    <col>
  </colgroup>
  <thead >
    <tr>

      <th style="text-align: center;">序号</th>
      <th style="text-align: center;">专业名称</th>
       
    </tr> 
  </thead>
  <tbody>
    <tr>
    <td>1</td>
      <td>移动互联</td>
      
    </tr>
    <tr>
    <td>2</td>
      <td>网站开发</td>
      
      
    </tr>
     <tr>
    <td>3</td>
      <td>数字媒体</td>
     
      
    </tr>
       </tr>
     <tr>
    <td>4</td>
      <td>应用电子物联网方向</td>
   
    </tr>

  </tbody>
</table>

 </div>       
</body>
<script src="../layui/layui.js" charset="utf-8"></script>
<script>
layui.use('element', function(){
  var element = layui.element(); //导航的hover效果、二级菜单等功能，需要依赖element模块
  
  //监听导航点击
  element.on('nav(demo)', function(elem){
    //console.log(elem)
    layer.msg(elem.text());
  });
});
</script>



</html>